package saleMarket.domain;

import lombok.*;
import saleMarket.domain.authority.Actor;

import java.io.Serializable;
import java.time.LocalDateTime;

@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
@ToString
//用户
public class User implements Comparable<User>, Serializable {
    private Integer id;
    private String username;
    private String password;
    //管理员，顾客，店铺主
    private Actor actor;
    private LocalDateTime loginTime;

    public User(String username,String password){
        this.username = username;
        this.password = password;
    }

    @Override
    public int compareTo(User o) {
        // TODO Auto-generated method stub
        return this.id - o.id;
    }
}
